package com.zhouheng.springbootdesignpattern.singletonpattern;

/**
 * 登记式/静态内部类 单例
 *
 * 懒加载，对静态域使用延迟初始化
 */
public class Register {

    private static class RegisterHolder {
        private static final Register INSTANCE = new Register();
    }

    private Register() {
    }

    public static final Register getInstance() {
        return RegisterHolder.INSTANCE;
    }

}
